package pers.cj.pdos.service;

import org.apache.ibatis.annotations.Param;
import pers.cj.pdos.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;
import pers.cj.pdos.vo.InGoodsRefundVo;
import pers.cj.pdos.vo.InGoodsVo;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chenj
 * @since 2019-11-04
 */
public interface IInGoodsRefundService extends IService<InGoodsRefund> {
    List<InGoodsRefundVo> listVo(String companyId,
                                 Integer page,
                                 Integer limit,
                                 Boolean close,
                                 String search,
                                 String no,
                                 String goodsName,
                                 String remark,
                                 String provider,
                                 Date makeTime1,
                                 Date makeTime2,
                                 String storeId,
                                 String userStoreId,
                                 String userId,
                                 Date date1,
                                 Date date2,
                                 Date date,
                                 String providerId,
                                 String houseId,
                                 String makeUserId);

    long count(String companyId,
               Boolean close,
               String search,
               String no,
               String goodsName,
               String remark,
               String provider,
               Date makeTime1,
               Date makeTime2,
               String storeId,
               String userStoreId,
               String userId,
               Date date1,
               Date date2,
               Date date,
               String providerId,
               String houseId,
               String makeUserId);

    InGoodsRefundVo getVoById(String id);

    List<InGoodsRefundVo> listVoByIds(List<String> ids);

    boolean checkNo(String no, String companyId);

    void insert(BusinessSet businessSet, InGoodsRefund inGoodsRefund, List<InGoodsRefundGoods> inGoodsRefundGoodsList, List<GoodsSn> goodsSnList, List<GoodsSnLog> goodsSnLogList);

    boolean checkClose(InGoodsRefund inGoodsRefund);

    void close(InGoodsRefund inGoodsRefund, BusinessSet businessSet);
}
